import { useEffect, useState } from 'react';
import { getClassRooManaGement } from '@/services/index';
import { Table, Tag, Space } from 'antd';
const RoomMangGement: React.FC = () => {
  //教室管理
  const [getMangGement, setMangGement] = useState<any[]>([]);
  //教室管理渲染
  useEffect(() => {
    getClassRooManaGement().then((res) => {
      setMangGement(res.data);
    });
  }, []);
  const columns = [
    {
      title: '教室号',
      dataIndex: 'room_text',
      key: 'name',
      render: (text: any) => <a>{text}</a>,
    },
    {
      title: '操作',
      dataIndex: 'age',
      key: 'age',
    },
  ];
  return (
    <div>
      <h1>教室管理</h1>
      <Table columns={columns} dataSource={getMangGement} />
    </div>
  );
};
export default RoomMangGement;
